
function dialog_password_(url, title, xy) {
	$('#dialog_edit').dialog('option', 'buttons', {

		"关闭": function() {
			$(this).dialog("close");
		},

		"修改": function() {			
			var form = $("#form_edit")[0];

			var body = { };
			body.password = form.password.value;
			body.newpassword = form.newpassword.value;
			body.renewpassword = form.renewpassword.value;
			if (body.password == null || body.password == '') {
				alert("旧密码不能为空，请重新输入！");
				return false;			
			}
			
			if (body.newpassword == null || body.newpassword == '') {
				alert("新密码不能为空，请重新输入！");
				return false;			
			}
			
			if (body.newpassword != body.renewpassword) {
				alert("新密码输入有误，请重新输入！");
				return false;			
			}
			
			if (!confirm("确认是否提交？")) {
				return false;
			}

			$(this).dialog("close");

			$.post('my.php?do=My.passwordPost', body, function(data) {
				var a = $.evalJSON(data);
				
				if (a.status == 1) {
					alert("密码修改成功！");
				}
				
				if (a.status == 2) {
					alert("旧密码不对，修改失败！");
				}				
			});
		}
	});

	dialog_edit(url, title, xy);
}